package live_schedule

import (
	"vrcm/src/vrcm/common/models"
)

type SourceGroup struct {
	models.Model

	TenantId  string `json:"tenant_id" gorm:"type:varchar(50);comment:租户id"`
	GroupName string `json:"group_name" gorm:"type:varchar(50);comment:组名称"`
	GroupDesc string `json:"group_desc" gorm:"type:varchar(300);comment:组描述"`
	IsDelete  int    `json:"is_delete" gorm:"type:tinyint;comment:是否删除 1删除 2未删除"`
	models.ModelTime
	models.ControlBy
}

func (SourceGroup) TableName() string {
	return "source_group"
}

func (e *SourceGroup) Generate() models.ActiveRecord {
	o := *e
	return &o
}

func (e *SourceGroup) GetId() interface{} {
	return e.Id
}

type SourceGroupRelation struct {
	models.Model

	TenantId string `json:"tenant_id" gorm:"type:varchar(50);comment:租户"`
	GroupId  int    `json:"group_id" gorm:"type:bigint unsigned;comment:组id"`
	SourceId int    `json:"source_id" gorm:"type:bigint;comment:信源id"`
	models.ModelTime
	models.ControlBy
}

type SourceGroupRelationModel struct {
	models.Model

	TenantId  string `json:"tenant_id" gorm:"type:varchar(50);comment:租户"`
	GroupId   int    `json:"group_id" gorm:"type:bigint unsigned;comment:组id"`
	SourceId  int    `json:"source_id" gorm:"type:bigint;comment:信源id"`
	GroupName string `json:"group_name"  gorm:"type:varchar(50); comment:组名"`
	models.ModelTime
	models.ControlBy
}
